#define _CRT_SECURE_NO_WARNINGS 1

class Solution {
public:
    string getEncryptedString(string s, int k) {
        string s1(s);
        int size = s.size();
        for (int i = 0; i < size; ++i)
        {
            s1[i] = s[(i + k) % size];
        }

        return s1;
    }
};